#!/usr/bin/env python
# -*- coding: utf-8  -*-

# This file is part of an old version of the Opuntia's lightweight ESTdb.
# This code is free software: you can
# redistribute it and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc., 51
# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Copyright Izaskun Mallona
# izaskun.mallona@gmail.com

def htmlUp():
    print "Content-type: text/html\n"  
    print """
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Language" content="English" /> 
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 
  <title>Opuntia DB</title>
  <meta name="keywords" content="opuntia, database" />
  <meta name="description" content="Opuntia db" />
  <link href="http://srvgen.upct.es/opuntia/style.css" rel="stylesheet" type="text/css"
  media="screen" />
</head>

<body>
  <div id="logo"><br />
  <img src="http://srvgen.upct.es/opuntia/images/logov2.png" width="380" height="90" alt=
  "logotype" /></div><!-- end #logo -->

  <div id="header">
    <div id="menu">
      <ul>
        <li><a href="http://srvgen.upct.es/opuntia/database.html">Opuntia db</a></li>

        <li><a href="http://srvgen.upct.es/efficiency.html">pcrEfficiency</a></li>

        <li><a href="http://www.upct.es/~genetica">Lab's main page</a></li>
      </ul>
    </div><!-- end #menu -->
  </div><!-- end #header -->
  <!-- end #header-wrapper -->

  <div id="page">
    """
    
def htmlBottom():
    print """
    </div><!-- end #content -->

    <div id="sidebar">
      <ul>
        <li>
          <h2>Opuntia db</h2>

          <ul>
            <li><a href="http://srvgen.upct.es/opuntia/database.html">BLAST</a></li>

            <li><a href="http://srvgen.upct.es/opuntia/regex.html">Repeat Finder</a></li>

            <li><a href="http://srvgen.upct.es/opuntia/fetch.html">Sequences retrieval
            (by id)</a></li>

            <li><a href="http://srvgen.upct.es/opuntia/search.html">Sequences retrieval
            (by keyword)</a></li>

            <li><a href="http://srvgen.upct.es/QSNPweb/results/O_fic/">SNPs and
            haplotypes</a></li>

            <li><a href=
            "http://srvgen.upct.es/opuntia/trf/index.html">
            Tandem repeats</a></li>

            <li><a href="http://srvgen.upct.es/opuntia/kobas.html">Pathways</a></li>
            
            <li><a href="http://srvgen.upct.es/opuntia/go.html">GO browser</a></li>

            <li><a href="http://srvgen.upct.es/opuntia/drought.html">Drought stress</a></li>
            
            <li><a href="#">Documentation</a></li>

            <li><a href="#">Statistics</a></li>

            <li><a href="#">Bulk data download</a></li>

            <li><a href="http://srvgen.upct.es/index.html">pcrEfficiency</a></li>
          </ul>
        </li>
      </ul>
    </div><!-- end #sidebar -->

    <div style="clear: both;">
      &nbsp;
    </div>
  </div><!-- end #page -->

  <div id="footer" align="center">
    <p id="versionInfo"><small>Copyright 2010 Genetics Group (Technical University of
    Cartagena). Send comments and feedback to <a href=
    "mailto:julia.weiss@upct.es">julia.weiss@upct.es</a>.<br />
    This service runs fetch.cgi version 0.1. <a href=
    "http://validator.w3.org/check?uri=referer">W3C HTML 4.01 compliant</a>.<br />
    Designed and maintained by Izaskun Mallona.</small></p>
  </div><!-- end #footer -->
</body>
</html>  
    """

def htmlFetchUp():
    print """
     <div id="content">
      <h2 class="breadcrumbs">Sequences retrieval (beta)</h2>

      <p>This tool is intented to provide sequences from the Opuntia database in FASTA
      format. Allowed queries include those with one or more identifiers: as result, a
      FASTA file will be generated.</p>
    """

def htmlSearchUp():
    print """
    <div id="content">
	 <h2 class="breadcrumbs">Sequences retrieval by descriptors (beta)</h2>
      <br>
       <p>This tool is intented to provide sequences from the Opuntia database in FASTA format according to keywords included in their description. In example, searching for 'dehydration' should return 60 sequences which were annotated as related to that proccess. As a result, a FASTA file will be generated.</p>
      <br>
    """
